{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-02-22T08:28:43.819713Z",
     "start_time": "2021-02-22T08:28:43.817078Z"
    }
   },
   "outputs": [],
   "source": [
    "from keras.datasets import boston_housing\n",
    "import numpy as np\n",
    "from keras import models\n",
    "from keras import layers\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 数据集"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-02-22T08:28:44.802818Z",
     "start_time": "2021-02-22T08:28:44.797841Z"
    }
   },
   "outputs": [],
   "source": [
    "(train_data, train_targets), (test_data, test_targets) = boston_housing.load_data()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-02-22T08:28:45.937524Z",
     "start_time": "2021-02-22T08:28:45.933959Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(404, 13)"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train_data.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-02-22T08:28:46.449691Z",
     "start_time": "2021-02-22T08:28:46.445916Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(102, 13)"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test_data.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-02-22T08:28:47.348496Z",
     "start_time": "2021-02-22T08:28:47.341417Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([15.2, 42.3, 50. , 21.1, 17.7, 18.5, 11.3, 15.6, 15.6, 14.4, 12.1,\n",
       "       17.9, 23.1, 19.9, 15.7,  8.8, 50. , 22.5, 24.1, 27.5, 10.9, 30.8,\n",
       "       32.9, 24. , 18.5, 13.3, 22.9, 34.7, 16.6, 17.5, 22.3, 16.1, 14.9,\n",
       "       23.1, 34.9, 25. , 13.9, 13.1, 20.4, 20. , 15.2, 24.7, 22.2, 16.7,\n",
       "       12.7, 15.6, 18.4, 21. , 30.1, 15.1, 18.7,  9.6, 31.5, 24.8, 19.1,\n",
       "       22. , 14.5, 11. , 32. , 29.4, 20.3, 24.4, 14.6, 19.5, 14.1, 14.3,\n",
       "       15.6, 10.5,  6.3, 19.3, 19.3, 13.4, 36.4, 17.8, 13.5, 16.5,  8.3,\n",
       "       14.3, 16. , 13.4, 28.6, 43.5, 20.2, 22. , 23. , 20.7, 12.5, 48.5,\n",
       "       14.6, 13.4, 23.7, 50. , 21.7, 39.8, 38.7, 22.2, 34.9, 22.5, 31.1,\n",
       "       28.7, 46. , 41.7, 21. , 26.6, 15. , 24.4, 13.3, 21.2, 11.7, 21.7,\n",
       "       19.4, 50. , 22.8, 19.7, 24.7, 36.2, 14.2, 18.9, 18.3, 20.6, 24.6,\n",
       "       18.2,  8.7, 44. , 10.4, 13.2, 21.2, 37. , 30.7, 22.9, 20. , 19.3,\n",
       "       31.7, 32. , 23.1, 18.8, 10.9, 50. , 19.6,  5. , 14.4, 19.8, 13.8,\n",
       "       19.6, 23.9, 24.5, 25. , 19.9, 17.2, 24.6, 13.5, 26.6, 21.4, 11.9,\n",
       "       22.6, 19.6,  8.5, 23.7, 23.1, 22.4, 20.5, 23.6, 18.4, 35.2, 23.1,\n",
       "       27.9, 20.6, 23.7, 28. , 13.6, 27.1, 23.6, 20.6, 18.2, 21.7, 17.1,\n",
       "        8.4, 25.3, 13.8, 22.2, 18.4, 20.7, 31.6, 30.5, 20.3,  8.8, 19.2,\n",
       "       19.4, 23.1, 23. , 14.8, 48.8, 22.6, 33.4, 21.1, 13.6, 32.2, 13.1,\n",
       "       23.4, 18.9, 23.9, 11.8, 23.3, 22.8, 19.6, 16.7, 13.4, 22.2, 20.4,\n",
       "       21.8, 26.4, 14.9, 24.1, 23.8, 12.3, 29.1, 21. , 19.5, 23.3, 23.8,\n",
       "       17.8, 11.5, 21.7, 19.9, 25. , 33.4, 28.5, 21.4, 24.3, 27.5, 33.1,\n",
       "       16.2, 23.3, 48.3, 22.9, 22.8, 13.1, 12.7, 22.6, 15. , 15.3, 10.5,\n",
       "       24. , 18.5, 21.7, 19.5, 33.2, 23.2,  5. , 19.1, 12.7, 22.3, 10.2,\n",
       "       13.9, 16.3, 17. , 20.1, 29.9, 17.2, 37.3, 45.4, 17.8, 23.2, 29. ,\n",
       "       22. , 18. , 17.4, 34.6, 20.1, 25. , 15.6, 24.8, 28.2, 21.2, 21.4,\n",
       "       23.8, 31. , 26.2, 17.4, 37.9, 17.5, 20. ,  8.3, 23.9,  8.4, 13.8,\n",
       "        7.2, 11.7, 17.1, 21.6, 50. , 16.1, 20.4, 20.6, 21.4, 20.6, 36.5,\n",
       "        8.5, 24.8, 10.8, 21.9, 17.3, 18.9, 36.2, 14.9, 18.2, 33.3, 21.8,\n",
       "       19.7, 31.6, 24.8, 19.4, 22.8,  7.5, 44.8, 16.8, 18.7, 50. , 50. ,\n",
       "       19.5, 20.1, 50. , 17.2, 20.8, 19.3, 41.3, 20.4, 20.5, 13.8, 16.5,\n",
       "       23.9, 20.6, 31.5, 23.3, 16.8, 14. , 33.8, 36.1, 12.8, 18.3, 18.7,\n",
       "       19.1, 29. , 30.1, 50. , 50. , 22. , 11.9, 37.6, 50. , 22.7, 20.8,\n",
       "       23.5, 27.9, 50. , 19.3, 23.9, 22.6, 15.2, 21.7, 19.2, 43.8, 20.3,\n",
       "       33.2, 19.9, 22.5, 32.7, 22. , 17.1, 19. , 15. , 16.1, 25.1, 23.7,\n",
       "       28.7, 37.2, 22.6, 16.4, 25. , 29.8, 22.1, 17.4, 18.1, 30.3, 17.5,\n",
       "       24.7, 12.6, 26.5, 28.7, 13.3, 10.4, 24.4, 23. , 20. , 17.8,  7. ,\n",
       "       11.8, 24.4, 13.8, 19.4, 25.2, 19.4, 19.4, 29.1])"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train_targets"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 准备数据\n",
    "普遍采用的最佳实践是对每\n",
    "个特征做标准化，即对于输入数据的每个特征（输入数据矩阵中的列），减去特征平均值，再除\n",
    "以标准差，这样得到的特征平均值为 0，标准差为 1。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-02-22T09:00:32.495410Z",
     "start_time": "2021-02-22T09:00:32.493079Z"
    }
   },
   "outputs": [],
   "source": [
    "mean = train_data.mean(axis=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-02-22T09:00:33.148380Z",
     "start_time": "2021-02-22T09:00:33.145778Z"
    }
   },
   "outputs": [],
   "source": [
    "train_data -= mean"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-02-22T09:00:34.147894Z",
     "start_time": "2021-02-22T09:00:34.145137Z"
    }
   },
   "outputs": [],
   "source": [
    "std = train_data.std(axis=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-02-22T09:02:46.878506Z",
     "start_time": "2021-02-22T09:02:46.875977Z"
    }
   },
   "outputs": [],
   "source": [
    "train_data /= std"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-02-22T09:02:47.028131Z",
     "start_time": "2021-02-22T09:02:47.025738Z"
    }
   },
   "outputs": [],
   "source": [
    "test_data -= mean"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-02-22T09:02:47.548093Z",
     "start_time": "2021-02-22T09:02:47.545949Z"
    }
   },
   "outputs": [],
   "source": [
    "test_data /= std"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-02-22T09:12:35.209387Z",
     "start_time": "2021-02-22T09:12:35.205859Z"
    }
   },
   "outputs": [],
   "source": [
    "def build_model():\n",
    "    model = models.Sequential() \n",
    "    model.add(layers.Dense(64, activation='relu',input_shape=(train_data.shape[1],))) \n",
    "    model.add(layers.Dense(64, activation='relu'))\n",
    "    model.add(layers.Dense(1))\n",
    "    model.compile(optimizer='rmsprop', loss='mse', metrics=['mae']) \n",
    "    return model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-02-22T09:14:14.321357Z",
     "start_time": "2021-02-22T09:14:14.318101Z"
    }
   },
   "outputs": [],
   "source": [
    "k=4\n",
    "num_val_samples = len(train_data) // k \n",
    "num_epochs = 100\n",
    "all_mae_histories = []\n",
    "all_scores = []"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "ExecuteTime": {
     "start_time": "2021-02-22T09:14:15.332Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "processing fold # 0\n"
     ]
    }
   ],
   "source": [
    "for i in range(k):\n",
    "    print(\"processing fold #\", i)\n",
    "    val_data = train_data[i * num_val_samples: (i + 1) * num_val_samples]\n",
    "    val_targets = train_targets[i * num_val_samples: (i + 1) * num_val_samples]\n",
    "    partial_train_data = np.concatenate([train_data[:i * num_val_samples],train_data[(i + 1) * num_val_samples:]], axis=0)\n",
    "    partial_train_targets = np.concatenate( [train_targets[:i * num_val_samples], train_targets[(i + 1) * num_val_samples:]], axis=0)\n",
    "    model = build_model()\n",
    "    history = model.fit(partial_train_data, partial_train_targets, epochs=num_epochs, batch_size=1, verbose=0)\n",
    "    val_mse, val_mae = model.evaluate(val_data, val_targets, verbose=0)\n",
    "    all_scores.append(val_mae)\n",
    "    mae_history = history.history['mae']\n",
    "    all_mae_histories.append(mae_history)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-07T07:28:44.871059Z",
     "start_time": "2020-12-07T07:28:44.866489Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2.3627965450286865"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.mean(all_scores)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-07T07:28:59.360698Z",
     "start_time": "2020-12-07T07:28:59.355557Z"
    }
   },
   "outputs": [],
   "source": [
    "average_mae_history = [\n",
    "np.mean([x[i] for x in all_mae_histories]) for i in range(num_epochs)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-07T07:29:06.374650Z",
     "start_time": "2020-12-07T07:29:06.371443Z"
    }
   },
   "outputs": [],
   "source": [
    "average_mae_history = np.asarray(all_mae_histories).mean(axis=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-07T07:29:07.329642Z",
     "start_time": "2020-12-07T07:29:07.184145Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEGCAYAAABiq/5QAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAf7klEQVR4nO3deZRcZ3nn8e9z61b1vkotqbVLtixZlpFtZLANScDGYTHbQM7YJMxhHCaekGTskITEJCdhMmfIGc4hnpCTQCIMx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 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(range(1, len(average_mae_history) + 1), average_mae_history) \n",
    "plt.xlabel('Epochs')\n",
    "plt.ylabel('Validation MAE')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-02-23T01:15:05.022482Z",
     "start_time": "2021-02-23T01:15:05.018491Z"
    }
   },
   "outputs": [],
   "source": [
    "def smooth_curve(points, factor=0.9): \n",
    "    smoothed_points = []\n",
    "    for point in points:\n",
    "        if smoothed_points:\n",
    "            previous = smoothed_points[-1]\n",
    "            smoothed_points.append(previous * factor + point * (1 - factor))\n",
    "        else: \n",
    "            smoothed_points.append(point)\n",
    "    return smoothed_points"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-02-23T01:15:05.571967Z",
     "start_time": "2021-02-23T01:15:05.477751Z"
    }
   },
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'average_mae_history' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-2-f50726cc6cd1>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0msmooth_mae_history\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0msmooth_curve\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0maverage_mae_history\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m10\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;31mNameError\u001b[0m: name 'average_mae_history' is not defined"
     ]
    }
   ],
   "source": [
    "smooth_mae_history = smooth_curve(average_mae_history[10:])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-07T07:29:11.735640Z",
     "start_time": "2020-12-07T07:29:11.568659Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEGCAYAAABo25JHAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAApz0lEQVR4nO3dd5hU5d3/8fd3G7D0svSygPQOC4IIIjbEqLFgR4UoYoxiy2Pi80tM8iR5YoJGjIUgoqiIBbA3jKKg1F2aVKWtLFIWkF539/v7Y4Y8RLcBO3t2Zz6v65prZ86cOfPlXMBnz32f+77N3RERkdgVF3QBIiISLAWBiEiMUxCIiMQ4BYGISIxTEIiIxLiEoAs4UXXq1PHU1NSgyxARKVcyMjK2u3tKfu+VuyBITU0lPT096DJERMoVM8ss6D01DYmIxDgFgYhIjFMQiIjEOAWBiEiMi1gQmFkTM5thZivNbLmZjcpnn+vNbGn4MdvMukSqHhERyV8k7xrKAe5z94VmVhXIMLOP3X3FcfusB85y9+/N7EJgHHB6BGsSEZEfiFgQuPtmYHP4+V4zWwk0AlYct8/s4z4yF2gcqXpERCR/pdJHYGapQDdgXiG7/Qz4oIDPjzCzdDNLz87OPqkaNu8+yF8+WMWG7ftP6vMiItEq4kFgZlWAqcDd7r6ngH3OJhQED+T3vruPc/c0d09LScl3YFyRFmz4nmdmrWPA6M+4Ztwc3ly0iUNHc0/qWCIi0cQiuTCNmSUC7wIfufujBezTGXgDuNDdvy7qmGlpaX6yI4u37jnElIwsXl2wkW93HqBGciJDejTmutOb0bxO5ZM6pohIeWBmGe6elu97kQoCMzNgIrDT3e8uYJ+mwKfAjT/oLyj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AkTKkIPu3jXoIkRKm64IRIpgZhvM7GEzmx9+nBbe3szMPjGzpeGfTcPb65nZG2a2JPw4I3yoeDN7JjzX/XQzqxTe/y4zWxE+zisB/TElhikIRP5PpR80DV193Ht73L0X8AShEeuEn7/g7p2BScDj4e2PA5+7exdC8/YsD29vBTzp7h2AXcAV4e2/ArqFjzMyMn80kYJpZLFImJntc/cq+WzfAAx093XhSfy2uHttM9sONHD3o+Htm929jpllA43d/fBxx0gFPg4vbIKZPQAkuvsfzexDYB/wJvCmu++L8B9V5D/oikCkeLyA5wXtk5/Dxz3P5f/66C4itKJeDyAjvCCKSKlREIgUz9XH/ZwTfj6b0CymANcDX4SffwLcDv9eH7laQQc1szigibvPILRgTg1CE5yJlBr95iHyfyqZ2eLjXn/o7sduIa1gZvMI/fJ0bXjbXcAEM/sloVW+hoW3jwLGmdnPCP3mfzuh1a7yEw+8ZGbVCS2o9PfwUpEipUZ9BCJFCPcRpLn79qBrEYkENQ2JiMQ4XRGIiMQ4XRGIiMQ4BYGISIxTEIiIxDgFgYhIjFMQiIjEuP8P4gc14URcUREAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(range(1, len(smooth_mae_history) + 1), smooth_mae_history) \n",
    "plt.xlabel('Epochs')\n",
    "plt.ylabel('Validation MAE')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-07T07:21:31.713654Z",
     "start_time": "2020-12-07T07:21:31.660821Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "4/4 [==============================] - 0s 841us/step - loss: 11.5938 - mae: 2.6690\n"
     ]
    }
   ],
   "source": [
    "model = build_model() \n",
    "model.fit(train_data, train_targets, epochs=80, batch_size=16, verbose=0)\n",
    "test_loss, test_mae_score = model.evaluate(test_data, test_targets)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-07T07:21:32.318377Z",
     "start_time": "2020-12-07T07:21:32.314296Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "11.593801498413086"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test_mse_score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-07T07:21:32.884649Z",
     "start_time": "2020-12-07T07:21:32.880726Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2.668959379196167"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test_mae_score"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python [conda env:py37] *",
   "language": "python",
   "name": "conda-env-py37-py"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.9"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
